﻿
function getOptions() {

    toastr.options = {
        "closeButton": true,
        "debug": false,
        "newestOnTop": true,
        "progressBar": $("#hdmsgprogressbar").val(),
        "positionClass": $("#hdmsgPostion").val(),
        "preventDuplicates": false,
        "onclick": null,
        "showDuration": "1000",
        "hideDuration": "1000",
        "timeOut": $("#hdmsgshowduration").val(),
        "extendedTimeOut": "1000",
        "showEasing": "swing",
        "hideEasing": "linear",
        "showMethod": "fadeIn",
        "hideMethod": "fadeOut"
    }

}

var messagebox = {

    success: function success(messagebox) {
        getOptions();
        toastr["success"](messagebox, "Success");
    },
    info: function info(messagebox) {
        getOptions();
        toastr["info"](messagebox, "Info");
    },
    warning: function Warning(messagebox) {
        getOptions();
        toastr["warning"](messagebox, "Warning");
    },
    error: function error(messagebox) {
        getOptions();
        toastr["error"](messagebox, "Error");
    }
}
